<template>
	<view class="businessmy">
		<view class="mytitle">
			<view class="title">
				我的
			</view>


			<div class="titleout">
				<view class="title_img" @click="navigateTo('/pages/gongyingshang/uerinfopage', 0)">
					<u-image :src="info.image" width="100%" height="100%" shape="circle"></u-image>
				</view>
				<view class="titlename">{{info.name}}</view>
				<view class="tagsview">企业商家</view>
				<view class="ketixianjine">
					可提现金额
				</view>
				<view class="jine">
					{{info.price || 0}}
				</view>
				<view class="tixianbtn" @click="navigateTo(`/pages/gongyingshang/tixian?price=${info.price || 0}`, 0)">
					提现</view>
				<view class="line"></view>

				<view class="dongjiejine">
					冻结金额
				</view>

				<view class="jine2">
					{{info.freezeBalance || 0}}
				</view>

				<view class="yitixianjine">
					已提现金额
				</view>

				<view class="jine3">
					{{info.withdrawal || 0}}
				</view>
			</div>


		</view>



		<view class="mycenter">
			<view class="titletext">
				店铺信息
			</view>
			<view class="mycenterflexview">
				<view class="mycenterflexviewitem" @click="navigateTo('/pages/business/daifahuopage', 1)">
					<view class="mycenterflexviewitem1">
						<u-image src="../../static/businessImg/1.png" width="55rpx" height="48rpx"
							style="margin: 0 auto;">

						</u-image>

						<u-badge type="error" :count="info.orderNum || 0" :absolute="true"
							:offset="[-15, 38]"></u-badge>
					</view>
					<view class="mycenterflexviewitem2">
						待发货订单
					</view>
				</view>

				<view class="mycenterflexviewitem" @click="navigateTo('/pages/business/daifahuopage', 2)">
					<view class="mycenterflexviewitem1">
						<u-image src="../../static/businessImg/2.png" width="55rpx" height="48rpx"
							style="margin: 0 auto;"></u-image>
					</view>
					<view class="mycenterflexviewitem2">
						已发货订单
					</view>
				</view>


				<view class="mycenterflexviewitem" @click="navigateTo('/pages/business/daifahuopage', 3)">
					<view class="mycenterflexviewitem1">
						<u-image src="../../static/businessImg/3.png" width="55rpx" height="48rpx"
							style="margin: 0 auto;"></u-image>
					</view>
					<view class="mycenterflexviewitem2">
						已完成订单
					</view>
				</view>


				<view class="mycenterflexviewitem" @click="navigateTo('/pages/business/daifahuopage', 5)">
					<view class="mycenterflexviewitem1">
						<u-image src="../../static/businessImg/4.png" width="55rpx" height="48rpx"
							style="margin: 0 auto;"></u-image>
					</view>
					<view class="mycenterflexviewitem2">
						售后订单
					</view>
				</view>
			</view>
			<view class="titletext" style="margin-top: 44rpx;">
				店铺管理
			</view>


			<view class="mycenterlastflex">
				<view class="mycenterlastflexitem" @click="navigateTo('/pages/business/uerinfopage', 0)">
					<view class="mycenterlastflexitem1">
						<u-image src="../../static/businessImg/5.png" width="53rpx" height="54rpx"
							style="margin: 0 auto;"></u-image>
					</view>

					<view class="mycenterlastflexitem2">
						店铺资料
					</view>
				</view>

				<view class="mycenterlastflexitem" @click="navigateTo('/pages/business/swippermanage',0)">
					<view class="mycenterlastflexitem1">
						<u-image src="../../static/businessImg/6.png" width="53rpx" height="54rpx"
							style="margin: 0 auto;"></u-image>
					</view>

					<view class="mycenterlastflexitem2">
						店铺轮播图
					</view>
				</view>


				<view class="mycenterlastflexitem" @click="handleShare">
					<view class="mycenterlastflexitem1">
						<u-image src="../../static/businessImg/7.png" width="53rpx" height="54rpx"
							style="margin: 0 auto;"></u-image>
					</view>

					<view class="mycenterlastflexitem2">
						店铺分享
					</view>
				</view>


				<view class="mycenterlastflexitem" @click="navigateTo('/pages/business/tiezilist?from=fx',0)">
					<view class="mycenterlastflexitem1">
						<u-image src="../../static/businessImg/8.png" width="53rpx" height="54rpx"
							style="margin: 0 auto;"></u-image>
					</view>

					<view class="mycenterlastflexitem2">
						我的帖子
					</view>
				</view>

				<view class="mycenterlastflexitem" @click="navigateTo('/pages/business/shangpinshangjia?from=fxs',0)">
					<view class="mycenterlastflexitem1">
						<u-image src="../../static/businessImg/type.png" width="53rpx" height="54rpx"
							style="margin: 0 auto;"></u-image>
					</view>

					<view class="mycenterlastflexitem2">
						商品类型
					</view>
				</view>



				<view class="mycenterlastflexitem" @click="navigateTo('/pages/business/userList?from=gys', 0)">
					<view class="mycenterlastflexitem1">
						<u-image mode="scaleToFill" src="../../static/businessImg/9.png" width="53rpx" height="54rpx"
							style="margin: 0 auto;"></u-image>
					</view>
					<view class="mycenterlastflexitem2">用户列表</view>
				</view>


				<view class="mycenterlastflexitem" @click="navigateTo('/pages/business/storeData?from=gys', 0)">
					<view class="mycenterlastflexitem1">
						<u-image src="../../static/businessImg/10.png" width="53rpx" height="54rpx"
							style="margin: 0 auto;"></u-image>
					</view>
					<view class="mycenterlastflexitem2">店铺数据</view>
				</view>


				<!-- <view class="mycenterlastflexitem">
					<view class="mycenterlastflexitem1">
						<u-image src="../../static/businessImg/down.png" width="53rpx" height="54rpx"
							style="margin: 0 auto;"></u-image>
					</view>

					<view class="mycenterlastflexitem2">
						商品下架
					</view>
				</view> -->
			</view>
		</view>
	</view>
</template>

<script>
import {
	storeHome
} from '@/api/storeAdmin.js';
import storage from '@/utils/storage.js';
import configs from "@/config/config";
export default {
	data() {
		return {

		}
	},

	props: {
		info: {
			type: Object,
			required: false
		}
	},

	mounted() {

	},


	methods: {

		handleShare() {

			uni.share({
				provider: "weixin",
				scene: "WXSceneSession",
				href: "http://jqq1.shangyunji.com:8091/test.html?id=" + this.info.id,
				imageUrl: this.info.image,
				type: 0,
				summary: this.info.name,
				title: "来我的小店看看吧~",
				success: function (res) {
					uni.showToast({
						title: "分享成功!",
						duration: 2000,
						icon: "none",
					});

				},
				fail: function (err) {
					uni.showToast({
						title: "分享失败!",
						duration: 2000,
						icon: "none",
					});

				},
			});


		},
		navigateTo(url, type) {
			if (type == 0) {
				uni.navigateTo({
					url: url
				})
			} else {
				uni.navigateTo({
					url: url + '?type=' + type
				})
			}

		}
	}
}
</script>

<style scoped>
.businessmy {
	width: 100%;
	position: relative;
	background: #FFFFFF;
}

.mytitle {
	width: 100%;
	height: 527rpx;
	background: url('../../static/businessImg/mybg.png') no-repeat;
	background-size: 100% 100%;
	position: relative;
}

.title {
	width: 100rpx;
	height: 32rpx;
	font-family: PingFang;
	font-weight: bold;
	font-size: 33rpx;
	color: #FFFFFF;
	line-height: 32rpx;
	text-align: center;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 105rpx;

}

.titleout {
	width: 92%;
	border-radius: 21rpx;
	background: #fff;
	position: absolute;
	top: 170rpx;
	left: 50%;
	transform: translateX(-50%);
	box-sizing: border-box;
	padding: 16rpx;
	height: 240rpx;
}

.title_img {
	width: 97rpx;
	height: 97rpx;
	border-radius: 50%;
	position: absolute;
	top: 16rpx;
	left: 16rpx;
}

.titlename {
	width: 220rpx;
	height: 32rpx;
	font-family: Adobe Heiti Std;
	font-weight: normal;
	font-size: 29rpx;
	color: #000000;
	line-height: 32rpx;
	position: absolute;
	top: 24rpx;
	left: 130rpx;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;

}


.tagsview {
	width: 106rpx;
	height: 32rpx;
	line-height: 32rpx;
	text-align: center;
	font-family: Adobe Heiti Std;
	font-weight: normal;
	font-size: 19rpx;
	color: #FFFFFF;
	position: absolute;
	top: 71rpx;
	left: 130rpx;
	border-radius: 50rpx;
	background: rgb(108, 168, 20);
}

.ketixianjine {
	height: 25rpx;
	font-family: Source Han Sans CN;
	font-weight: 400;
	font-size: 23rpx;
	color: #000000;
	line-height: 25rpx;
	position: absolute;
	top: 28rpx;
	left: 350rpx;

}

.yitixianjine {
	height: 25rpx;
	font-family: Source Han Sans CN;
	font-weight: 400;
	font-size: 23rpx;
	color: #000000;
	line-height: 25rpx;
	position: absolute;
	top: 150rpx;
	left: 350rpx;
}


.dongjiejine {
	height: 25rpx;
	font-family: Source Han Sans CN;
	font-weight: 400;
	font-size: 23rpx;
	color: #000000;
	line-height: 25rpx;
	position: absolute;
	top: 150rpx;
	left: 16rpx;
}

.jine {
	width: 160rpx;
	height: 35rpx;
	font-family: Source Han Sans CN;
	font-weight: 500;
	font-size: 44rpx;
	color: #EF3E3E;
	line-height: 35rpx;
	position: absolute;
	top: 76rpx;
	left: 350rpx;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.jine2 {
	font-family: Source Han Sans CN;
	font-weight: 400;
	font-size: 33rpx;
	color: #000000;
	position: absolute;
	left: 16rpx;
	bottom: 16rpx;

}

.jine3 {
	font-family: Source Han Sans CN;
	font-weight: 400;
	font-size: 33rpx;
	color: #000000;
	position: absolute;
	left: 350rpx;
	bottom: 16rpx;
}

.tixianbtn {
	width: 130rpx;
	height: 35rpx;
	background: rgb(237, 35, 35);
	position: absolute;
	top: 80rpx;
	border-radius: 35rpx;
	text-align: center;
	left: 500rpx;
	color: #fff;


	font-family: Source Han Sans CN;
	font-weight: 500;
	font-size: 26rpx;

}

.line {
	width: 100%;
	position: absolute;
	height: 1rpx;
	background: #f3f3f3;
	left: 50%;
	transform: translateX(-50%);
	top: 134rpx;
}

.mycenter {
	width: 100%;
	height: 786rpx;
	background: #FFFFFF;
	border-radius: 21rpx 21rpx 0rpx 0rpx;
	position: absolute;
	top: 425rpx;
	padding: 0 41rpx;
}

.titletext {
	height: 102rpx;
	line-height: 102rpx;
	font-family: Adobe Heiti Std;
	font-weight: bold;
	font-size: 30rpx;
	color: #101624;

	margin: 0 auto;
	padding-left: 20rpx;
}

.mycenterflexview {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 88rpx;
}

.mycenterflexviewitem {
	width: 25%;
	height: 100%;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	align-content: space-between;
	text-align: center;
	font-family: Source Han Sans CN;
	font-weight: 500;
	font-size: 28rpx;
	color: #101624;
	line-height: 27rpx;
}

.mycenterflexviewitem1 {
	width: 100%;
	height: 48rpx;
	position: relative;
}

.mycenterflexviewitem2 {
	width: 100%;
	height: 27rpx;
}

.mycenterlastflex {
	margin-top: 30rpx;
	width: 100%;
	display: grid;
	grid-template-columns: repeat(auto-fill, 170rpx);
	grid-gap: 50rpx 80rpx;
	justify-content: center;
}

.mycenterlastflexitem {
	width: 170rpx;
	height: 108rpx;

	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-content: space-between;
}

.mycenterlastflexitem1 {
	width: 100%;
	height: 54rpx;

}

.mycenterlastflexitem2 {
	width: 100%;
	height: 26rpx;
	text-align: center;
	line-height: 26rpx;
	font-family: Source Han Sans CN;
	font-weight: 500;
	font-size: 28rpx;
	color: #101624;
}
</style>
